//加载资源:js/css资源
(function () {
	if (window.__loadresource_flg) {
		return;
	}
	window.__loadresource_flg = true;

	//加载资源
	//resourceList:资源列表(js/css资源)
	window.loadResource = function (resourceList, version) {
		if (version == null || typeof version == 'undefined') {
			version = '';
		}
		var htmlStr = '';
		var v = version + '' + (window.DEBUG ? new Date().getTime()
			: new Date().getDate() + '_' + new Date().getHours());//每小时更新一次
		for (var i = 0; i < resourceList.length; i++) {
			var item = resourceList[i];
			if (/\.js$/.test(item)) {//js
				htmlStr += '<script src="' + item + '?v=' + v + '"><' + '/script>';
			} else {
				htmlStr += '<link href="' + item + '?v=' + v + '" rel="stylesheet">';
			}
		}
		document.write(htmlStr);
	};

})();